
# from app.api.generate.utils.generate_queue.mqtt import client
#
#
# def start_listen_queue():
#     client.loop_start()
#
#
# def send_queue_message(topic, data):
#     client.publish(topic, data)

from app.api.generate.utils.generate_queue.kafka_queue import start_listen_kafka, kafka_send_msg
import threading


def start_listen_queue():
    t = threading.Thread(target=start_listen_kafka)
    t.daemon = True
    t.start()


def send_queue_message(topic, data):
    kafka_send_msg(topic, data)

